package com.qingzhou.web.repository.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.handler.Fastjson2TypeHandler;
import com.qingzhou.common.web.domain.BaseEntity;
import com.qingzhou.common.web.domain.FileVo;
import com.qingzhou.web.service.impl.convert.DictParent;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 病理信息 对象
 * @author xm
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Table(value = "edc_pathology")
public class PathologyEntity extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @Id
    private Long id;
    @ApiModelProperty(value = "状态")
    private String status;
    @ApiModelProperty(value = "患者编号")
    private String patientCode;
    @ApiModelProperty(value = "病理编号")
    private String pathologicalNumber;

    // 手术病理部分
    @ApiModelProperty(value = "手术病理取样日期")
    @DateTimeFormat("yyyy年MM月dd日")
    private Date samplingDate;
    @ApiModelProperty(value = "手术病理病灶位置")
    private String lesionLocation;
    @ApiModelProperty(value = "手术病理是否多病灶", notes = "字典 sys_yes_no")
    @DictParent("sys_yes_no")
    private String isMultifocal;
    @ApiModelProperty(value = "原发vs转移", notes = "字典 primary_vs_transfer")
    @DictParent("primary_vs_transfer")
    private String primaryVsTransfer;
    // 病理TNM分期（key）
    @ApiModelProperty(value = "第8版手术病理T分期")
    private String tblStaging;
    @ApiModelProperty(value = "第8版手术病理N分期")
    private String nblStaging;
    @ApiModelProperty(value = "第8版手术病理M分期")
    private String mblStaging;
    @ApiModelProperty(value = "第8版手术病理TNM分期",notes="字典 tnm_stage_dict")
    @DictParent("tnm_stage_dict")
    private String tnm;
    @ApiModelProperty(value = "第9版手术病理T分期")
    private String tblNineStaging;
    @ApiModelProperty(value = "第9版手术病理N分期")
    private String nblNineStaging;
    @ApiModelProperty(value = "第9版手术病理M分期")
    private String mblNineStaging;
    @ApiModelProperty(value = "第9版手术病理TNM分期",notes="字典 tnm_stage_dict")
    @DictParent("tnm_stage_dict")
    private String nineTnm;
    @ApiModelProperty(value = "手术病理是否新辅助治疗",notes="字典 sys_yes_no")
    @DictParent("sys_yes_no")
    private String isNeoadjuvantTherapy;
    @ApiModelProperty(value = "手术病理病理疗效",notes="字典 sys_yes_no")
    @DictParent("pathology_effect_dict")
    private String pathologyEffect;
    @ApiModelProperty(value = "残留肿瘤比例（RVT%）")
    private String tumorRatio;
    @ApiModelProperty(value = "手术病理病理类型")
    private String pathologicType;
    @ApiModelProperty(value = "手术病理病理亚型", notes = "字典 pathologic_sub_type")
    @DictParent("pathologic_sub_type")
    private String pathologicSubtype;
    @ApiModelProperty(value = "手术病理病理报告描述")
    private String pathologicReportDescribe;
    @ApiModelProperty(value = "手术病理气腔内播散STAS")
    private String qqnbsSTAS;
    @ApiModelProperty(value = "手术病理胸膜侵犯")
    private String visceralPleura;
    @ApiModelProperty(value = "手术病理是否有淋巴结转移", notes = "字典 sys_yes_no")
    @DictParent("sys_yes_no")
    private String isMetastasisZY;
    @ApiModelProperty(value = "手术病理具体转移淋巴")
    private String haveZyMetastasis;
    @ApiModelProperty(value ="手术病理驱动突变")
    private String driverMut;
    @ApiModelProperty(value = "手术病理是否R0切缘", notes = "字典 r_switch_dict")
    @DictParent("r_switch_dict")
    private String isRoSwitch;

    // 非手术病理部分
    @ApiModelProperty(value = "是否做非手术病理")
    @DictParent("sys_yes_no")
    private String ccIsPuncture;
    @ApiModelProperty(value = "非手术病理检测时间")
    @DictParent("test_time_dict")
    private String testDate;
    @ApiModelProperty(value = "非手术病理取样时间")
    @DateTimeFormat("yyyy年MM月dd日")
    private Date ccSamplingTime;
    @ApiModelProperty(value = "非手术病理编号")
    private String ccPathologyNum;
    @ApiModelProperty(value = "非手术病理病理类型")
    private String ccPathType;
    @ApiModelProperty(value = "非手术病理PD-L1%")
    private String ccPdl1;
    @ApiModelProperty(value = "取材位置")
    private String punctureLocation;
    @ApiModelProperty(value = "脉管内癌栓")
    @DictParent("sys_yes_no")
    private String vesselCancer;
    @ApiModelProperty(value = "非手术病理报告描述")
    private String ccReportDesc;

    // 分子特征（驱动基因+PD-L1）
    @ApiModelProperty(value = "手术病理分子特征样本编号")
    private String fzPathNum;
    @ApiModelProperty(value = "手术病理分子特征驱动突变基因",notes = "字典 driver_mut_gene")
    @DictParent("driver_mut_gene")
    private String driverMutGene;
    @ApiModelProperty(value = "手术病理分子特征具体突变位点",notes = "富文本框，内容特别多")
    private String fzMutResultInfor;
    @ExcelProperty(value = {"手术病理分子特征","PD-L1%"})
    private String fzPdl1;
    @ApiModelProperty(value = "手术病理分子特征突变结果文件",notes = "基因，核苷酸，氨基酸，突变丰度等单文件")
    @Column(typeHandler = Fastjson2TypeHandler.class)
    private FileVo fzMutationResults;

    @ApiModelProperty(value = "非手术病理分子特征样本编号")
    private String otherFzPathNum;
    @ApiModelProperty(value = "非手术病理分子特征驱动突变基因",notes = "字典 driver_mut_gene")
    @DictParent("driver_mut_gene")
    private String otherDriverMutGene;
    @ApiModelProperty(value = "非手术病理分子特征具体突变位点",notes = "富文本框，内容特别多")
    private String otherFzMutResultInfor;
    @ExcelProperty(value = {"非手术病理分子特征","PD-L1%"})
    private String otherFzPdl1;
    @ApiModelProperty(value = "非手术病理分子特征突变结果文件",notes = "基因，核苷酸，氨基酸，突变丰度等单文件")
    @Column(typeHandler = Fastjson2TypeHandler.class)
    private FileVo otherFzMutationResults;

    @ApiModelProperty(value = "数据检查原因")
    private String editReason;
    @ApiModelProperty(value = "终止原因")
    private String stopReason;
}
